Ext.ns("Index");

Index.Employee = function() {
	this.say = function(say) {
		Ext.MessageBox.alert(say);
	}
}
Index.EmployeePanel = Ext.extend(Ext.grid.GridPanel, {
			title : '人员信息',
			height : 300,
			width : 400,
			columns : [{
						header : '姓名',
						sortable: true,
						dataIndex : "name"
					}, {
						header : '职位',
						dataIndex : "job"
					}],
			initComponent : function() {
				Index.EmployeePanel.superclass.initComponent.call(this);
			}

		});

Ext.onReady(function() {
			var _empPanel = new Index.EmployeePanel({});
			var _empStore = new Ext.data.JsonStore({
						url : "data.json",
						root : 'emp',
						fields : ["name", "job"]
					});
			_empStore.reload();
			_empPanel.store = _empStore;
			_empPanel.render(Ext.getBody());

		})
